<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<!-- vbind 绑定class 数组语法 -->
<body>
    <!--"[aclass,bclass]" 和"['aclass','bclass']" 不同 ，后者两个都是字符串 前者两个都是变量(会拿到下面的变量对应的值)-->
    <div id="hello" :class="[aclass,bclass]">
        {{message}}
        <p :class="getClass()">testclass</p>
    </div>
    <script src="../vue.js"></script>
    <script>
        const vue01 = new Vue({
            el: '#hello',
            data: {
                message: 'hello vuejs',
                aclass:'aaa',
                bclass:'bbb',
            },
            methods: {
                getClass:function(){
                    return [this.aclass,this.bclass];
                }
            },
        })
    </script>
</body>

</html>